<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	${param.title }
</div>
	<table  id="grant_schedule" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
			<col width="4%" />
			<col width="4%" />
			<col width="17%" />
			<col width="15%" />
			<col width="15%" />
			<col width="15%" />
			<col width="15%" />
			<col width="15%" />
			
			<thead >
					<tr style="organization_finances/financeborder:1px solid #B7D1E6">
						<th class="TblHead" align="center"  >选择</th>
						<th class="TblHead" align="center"  >序号</th>
						<th class="TblHead" align="center"  >年度</th>
						<th class="TblHead" align="center"  >合计</th>
						<th class="TblHead" align="center"  >省拨</th>
						<th class="TblHead" align="center"  >贷款</th>
						<th class="TblHead" align="center"  >自筹</th>
						<th class="TblHead" align="center"  >其他</th> 
					</tr>
			</thead>
			<tbody id="tab">
					<tr style="display:none">
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selGrantSchedule" >
						</td>
						<td align="center">&nbsp;
							<span name="grant_schedule|schedule[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">&nbsp;
							<input name="grant_schedule|schedule[0]|year" class="input_css  year" label="年度" value="" style="text-align:center; width:80%;" onfocus="InitInput.setNumber(this,4,0,0)" />
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_total" name="grant_schedule|schedule[0]|total" class="gray input_css   " label="合计"  disabled value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  /> 
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_province" name="grant_schedule|schedule[0]|grant_of_province" class="input_css  " label="省拨"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_[index]_','province,loan,own,other','total');"/>
						</td> 
						<td align="center">&nbsp;
							<input id="grant_[index]_loan" name="grant_schedule|schedule[0]|grant_of_loan" class="input_css  " label="贷款"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)" onchange="countFund('grant_[index]_','province,loan,own,other','total');" />
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_own" name="grant_schedule|schedule[0]|grant_of_own" class="input_css  " label="自筹"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)" onchange="countFund('grant_[index]_','province,loan,own,other','total');" />
						</td>
						<td align="center">&nbsp;
							<input id="grant_[index]_other" name="grant_schedule|schedule[0]|grant_of_other" class="input_css  " label="其他"  value="" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_[index]_','province,loan,own,other','total');"/>
						</td>
					</tr>
					
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/grant_schedule/schedule" var="schedule">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr >
						<td>&nbsp;
							<input type="radio" class="radiobutton" name="selGrantSchedule" >
						</td>
						<td align="center">&nbsp;
							<span name="grant_schedule/schedule[${flag}${index}]@seq_no" ><x:out select="$schedule/@seq_no"/></span> 
						</td>
						<td align="center">&nbsp;
							<input value="<x:out select="$schedule/year"/>" class="input_css  year" label="年度" name="grant_schedule/schedule[${flag}${index}]/year" style="text-align:center; width:80%;" onfocus="InitInput.setNumber(this,4,0,0)"  /> 
						</td>
						<td align="center">&nbsp;
							<input id="grant_${flag}${index}_total" value="<x:out select="$schedule/total"/>" class="gray input_css   " label="合计"   disabled name="grant_schedule/schedule[${flag}${index}]/total" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  />
						</td>
						<td align="center">&nbsp;
							<input id="grant_${flag}${index}_province" value="<x:out select="$schedule/grant_of_province"/>" class="input_css  " label="省拨"    name="grant_schedule/schedule[${flag}${index}]/grant_of_province" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_${flag}${index}_','province,loan,own,other','total');"/>
						</td>
						<td align="center">&nbsp;
							<input id="grant_${flag}${index}_loan" value="<x:out select="$schedule/grant_of_loan"/>" class="input_css  " label="贷款"    name="grant_schedule/schedule[${flag}${index}]/grant_of_loan" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_${flag}${index}_','province,loan,own,other','total');"/>
						</td>
						<td align="center">&nbsp;
							<input id="grant_${flag}${index}_own" value="<x:out select="$schedule/grant_of_own"/>" class="input_css  " label="自筹"    name="grant_schedule/schedule[${flag}${index}]/grant_of_own" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)"  onchange="countFund('grant_${flag}${index}_','province,loan,own,other','total');"/>
						</td>
						<td align="center">&nbsp;
							<input id="grant_${flag}${index}_other" value="<x:out select="$schedule/grant_of_other"/>" class="input_css  " label="其他"    name="grant_schedule/schedule[${flag}${index}]/grant_of_other" style="text-align:right; width:80%;" onfocus="InitInput.setNumber(this,7,2,2)" onchange="countFund('grant_${flag}${index}_','province,loan,own,other','total');" />
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
					</table>
					<br/>

					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('grant_schedule',99,'${param.tips}最多只能填写99条')){addNewRow('grant_schedule');showDateTag('grant_schedule');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('grant_schedule','selGrantSchedule')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('grant_schedule','selGrantSchedule')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('grant_schedule','${param.tips }')">
					</td></tr>
	</table>
	<br/>
<script type="text/javascript">
$(function() {
	$("#grant_schedule tr:even").addClass("li_1");
	$("#grant_schedule tr:odd").addClass("li_2");
});
</script>